package guo.mybatis;

import guo.mybatis.config.Configuration;
import guo.mybatis.service.UserService;
import guo.mybatis.session.SqlSession;
import guo.mybatis.session.SqlSessionFactory;

import java.sql.Connection;

public class Main {
	public static void main(String[] args) {
		ClassLoader classLoader = Main.class.getClassLoader();
		Configuration configuration = new Configuration(classLoader,"mybatis.xml");
		SqlSessionFactory sqlSessionFactory = new SqlSessionFactory(configuration);
		SqlSession sqlSession = sqlSessionFactory.openSession();




//		Connection connection = configuration.getJdbcUtils().openConnection();
//		UserService userService = new UserService();
//		String name = userService.selectNameById(connection,1);
//		System.out.println(name);
	}
}


